//
// Created by denglibin on 2021/6/2.
//

#ifndef SDL_DEMO_GAME_WINDOW_H
#define SDL_DEMO_GAME_WINDOW_H
#include <SDL.h>
#include "main_spirit.h"
typedef struct game_window{
    int fps; //帧率
    int scene_index;
    int run; //运行状态 1：运行 0:停止
    uint32_t start;
    int  interval; //记录两帧间隔时间
    SDL_Event  event; //保存事件
    MainSpirit * mainSpirit;
    int win_w; //宽
    int win_h; //高
    SDL_Window * win; //窗口
    SDL_Surface * winSurface; //窗口的surface
    SDL_Renderer * winRender;//窗口渲染器
}GameWindow;

/**
 * 创建
 * @param width
 * @param height
 * @param title
 * @return
 */
GameWindow * GameWindowCreate(int width, int height, const char* title);

/**
 * 释放空间
 * @param window
 */
void GameWindowFree(GameWindow* gameWindow);
#endif //SDL_DEMO_GAME_WINDOW_H
